﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        public static Dictionary<string, string> _user = new Dictionary<string, string>();

        private void Forml_Load(object sender, EventArgs e)
        {
            _user.Add("18810189268", "zqx123456");
        
        }
        private void button1_Click(object sender, EventArgs e)
        {
            
            var uNe = userName.Text;
            var pWd = passWard.Text;



            var zqx = _user.Where(x => x.Key == uNe).FirstOrDefault();
            if (zqx.Key==uNe && zqx.Value==pWd)
            {
                MessageBox.Show("请健康游玩", "登陆成功",MessageBoxButtons.YesNo,MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("请先去注册", "登陆失败",MessageBoxButtons.YesNo,MessageBoxIcon.Warning);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Register register = new Register();
            register.Show();
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }
    }
}
